package com.illtamer.infinite.derive;

import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.io.InputStream;
import java.util.Date;
import java.util.List;

public interface Path {

    @NotNull
    List<Path> list();

    boolean isDirectory();

    @NotNull
    String getName();

    long getSize();

    Date lastModified();

    @Nullable
    Path getParent();

    /**
     * The relative path is the path level of the current {@link Path}
     * relative th root {@link Path}, it always a pattern of the
     * absolute path.
     * */
    @NotNull
    String getRelativePath();

    /**
     * The absolute path is the total path string of the file. No matter
     * how you call this path string, you will get the file.
     * */
    @NotNull
    String getAbsolutePath();

    @NotNull
    InputStream getInputStream();
}
